package com.zhoushihao.class0806;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class EntranceSystem {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] num = new int[n];
        int[] count = new int[n];
        int[] arr = new int[n];
        for(int i=0;i<n;i++){
            num[i] = sc.nextInt();
            count[num[i]]++;
            arr[i] = count[num[i]];
        }
        for(int i=0;i<n;i++){
            System.out.print(arr[i]+" ");
        }
    }
}
